EpiCompare compares different epigenetic datasets for quality control and benchmarking purposes. The report is divided into three sections:

  1. General Metrics: Metrics on fragments (duplication rate) and peaks (blacklisted peaks and peak widths) of input files
  2. Peak Overlap: Percentage and statistical significance of overlapping and unon-overlapping peaks.
  3. Functional Annotation: Functional annotation (ChromHMM, ChIPseeker and enrichment analysis) of peaks.

Input Datasets
  • Reference peakfile: ENCODE_H3K27ac
  • Total of 12 peak files:
## [1] "File1: H3K27ac_CnT_ActiveMotif_MACS2"
## [1] "File2: H3K27ac_CnT_ActiveMotif_SEACR"
## [1] "File3: H3K27ac_CnT_Abcam-ab4729_MACS2"
## [1] "File4: H3K27ac_CnT_Abcam-ab4729_SEACR"
## [1] "File5: H3K27ac_CnT_SRR8383507_MACS2"
## [1] "File6: H3K27ac_CnT_SRR8383507_SEACR"
## [1] "File7: H3K27me3_ENCODE_MACS2.bed"
## [1] "File8: H3K27me3_ENCODE_SEACR.bed"
## [1] "File9: H3K27ac_ENCODE"
## [1] "File10: H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R1"
## [1] "File11: H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R2"
## [1] "File12: H3K27ac_TIP_Abcam.phase_2_03_feb_2022.S_4_R1"
Code
EpiCompare(peakfiles = list(H3K27ac_CnT_ActiveMotif_MACS2, H3K27ac_CnT_ActiveMotif_SEACR, H3K27ac_CnT_Abcam-ab4729_MACS2, H3K27ac_CnT_Abcam-ab4729_SEACR, H3K27ac_CnT_SRR8383507_MACS2, H3K27ac_CnT_SRR8383507_SEACR, H3K27me3_ENCODE_MACS2.bed, H3K27me3_ENCODE_SEACR.bed, H3K27ac_ENCODE, H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R1, H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R2, H3K27ac_TIP_Abcam.phase_2_03_feb_2022.S_4_R1),
           blacklist = blacklist,
           picard_files = list(),
           reference = ENCODE_H3K27ac,
           stat_plot = TRUE,
           chrmHMM_plot = TRUE,
           chrmHMM_annotation = "K562",
           chipseeker_plot = TRUE,
           enrichment_plot = TRUE,
           interact = TRUE,
           save_output = FALSE,
           output_dir = "/Users/serachoi/Documents/EpiCompare")

1. General Metrics

Peak Information

Column Description:

  • PeakN before tidy: Total number of peaks including those blacklisted and those in non-standard chromosomes.

  • Blacklisted peaks removed (%): Percentage of blacklisted peaks present in the sample. ENCODE blacklist includes regions in the hg19 genome that have anomalous and/or unstructured signals independent of the cell-line or experiment.

  • Non-standard peaks removed (%): Percentage of peaks identified in non-standard and/or mitochondrial chromosomes. Identified using BRGenomics::tidyChromosomes().

  • PeakN after tidy: Total number of peaks after filtering blacklisted peaks and those in non-standard chromosomes.

    NB: All analyses in EpiCompare are conducted on tidied datasets (i.e. blacklisted peaks and those in non-standard chromosomes removed)


Sample PeakN before tidy Blacklisted peaks removed (%) Non-standard peaks removed (%) PeakN after tidy
H3K27ac_CnT_ActiveMotif_MACS2 2526 23.200 7.050 1762
H3K27ac_CnT_ActiveMotif_SEACR 3211 17.800 4.390 2497
H3K27ac_CnT_Abcam-ab4729_MACS2 26077 6.800 0.874 24076
H3K27ac_CnT_Abcam-ab4729_SEACR 13530 5.690 0.761 12657
H3K27ac_CnT_SRR8383507_MACS2 13456 3.470 0.498 12922
H3K27ac_CnT_SRR8383507_SEACR 6669 3.420 0.390 6415
H3K27me3_ENCODE_MACS2.bed 89900 2.850 0.414 86965
H3K27me3_ENCODE_SEACR.bed 107569 2.930 0.435 103953
H3K27ac_ENCODE 51176 0.952 0.000 50689
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R1 60064 2.670 0.526 58143
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R2 110709 2.530 0.447 107413
H3K27ac_TIP_Abcam.phase_2_03_feb_2022.S_4_R1 73765 2.620 0.493 71472

Fragment Information

Metrics on fragments is shown only if Picard summary is provided. See manual for help.

Column Description:

  • Mapped_Fragments: Number of mapped read pairs in the file.
  • Duplication_Rate: Percentage of mapped sequence that is marked as duplicate.
  • Unique_Fragments: Number of mapped sequence that is not marked as duplicate.



Peak widths

Distribution of peak widths in each sample.



2. Peak Overlap

Percentage Overlap

Heatmap of percentage of overlapping peaks between samples. Hover over the heatmap for percentage values.

N.B. How to interpret heatmap: [Samples in x-axis of heatmap] peaks in [Samples in y-axis of heatmap] peaks



Statistical Significance

The plot is shown only if a reference peak file is provided and stat_plot = TRUE. Depending on the format of the reference file, EpiCompare outputs different plots:

  • Reference dataset has BED6+4 format (peakcalling performed with MACS2): EpiCompare generates paired boxplot per sample showing the distribution of -log10(q-value) of reference peaks that are overlapping and non-overlapping with the sample dataset.
  • Reference dataset does not have BED6+4 format: EpiCompare generates a barplot of percentage of overlapping sample peaks with the reference, coloured by statistical significance (adjusted p-value) of the overlap.

Keys:

Reference peakfile: ENCODE_H3K27ac

  • Overlap: Sample peaks in Reference peaks
  • Unique: Sample peaks not in Reference peaks



3. Functional Annotation

3.1 ChromHMM

ChromHMM annotates and characterises peaks into different chromatin states. ChromHMM annotations used in EpiCompare were obtained from here.

  • Cell-type annotation file used in this analysis: K562

All samples

ChromHMM annotation of individual samples.

Overlap: Sample peaks in Reference peaks

Percentage of Sample peaks found in Reference peaks (Reference peakfile: ENCODE_H3K27ac)

Percentage
H3K27ac_CnT_ActiveMotif_MACS2 63.200
H3K27ac_CnT_ActiveMotif_SEACR 77.200
H3K27ac_CnT_Abcam-ab4729_MACS2 78.700
H3K27ac_CnT_Abcam-ab4729_SEACR 89.700
H3K27ac_CnT_SRR8383507_MACS2 83.300
H3K27ac_CnT_SRR8383507_SEACR 92.500
H3K27me3_ENCODE_MACS2.bed 1.310
H3K27me3_ENCODE_SEACR.bed 0.731
H3K27ac_ENCODE 100.000
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R1 8.250
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R2 7.970
H3K27ac_TIP_Abcam.phase_2_03_feb_2022.S_4_R1 9.730

ChromHMM annotation of sample peaks found in reference peaks.

Overlap: Reference peaks in Sample peaks

Percentage of Reference peaks found in Sample peaks (Reference peakfile: ENCODE_H3K27ac)

Percentage
H3K27ac_CnT_ActiveMotif_MACS2 2.24
H3K27ac_CnT_ActiveMotif_SEACR 4.65
H3K27ac_CnT_Abcam-ab4729_MACS2 44.40
H3K27ac_CnT_Abcam-ab4729_SEACR 46.30
H3K27ac_CnT_SRR8383507_MACS2 27.10
H3K27ac_CnT_SRR8383507_SEACR 25.30
H3K27me3_ENCODE_MACS2.bed 2.65
H3K27me3_ENCODE_SEACR.bed 1.83
H3K27ac_ENCODE 100.00
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R1 12.70
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R2 27.70
H3K27ac_TIP_Abcam.phase_2_03_feb_2022.S_4_R1 23.00

ChromHMM annotation of reference peaks found in sample peaks.

Unique: Sample peaks not in Reference peaks

Percentage of sample peaks not found in reference peaks (Reference peakfile: ENCODE_H3K27ac)

Percentage
H3K27ac_CnT_ActiveMotif_MACS2 36.80
H3K27ac_CnT_ActiveMotif_SEACR 22.80
H3K27ac_CnT_Abcam-ab4729_MACS2 21.30
H3K27ac_CnT_Abcam-ab4729_SEACR 10.30
H3K27ac_CnT_SRR8383507_MACS2 16.70
H3K27ac_CnT_SRR8383507_SEACR 7.48
H3K27me3_ENCODE_MACS2.bed 98.70
H3K27me3_ENCODE_SEACR.bed 99.30
H3K27ac_ENCODE 0.00
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R1 91.70
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R2 92.00
H3K27ac_TIP_Abcam.phase_2_03_feb_2022.S_4_R1 90.30

ChromHMM annotation of sample peaks not found in reference peaks.

Unique: Reference peaks not in Sample peaks

Percentage of reference peaks not found in sample peaks (Reference peakfile: ENCODE_H3K27ac)

Percentage
H3K27ac_CnT_ActiveMotif_MACS2 97.8
H3K27ac_CnT_ActiveMotif_SEACR 95.4
H3K27ac_CnT_Abcam-ab4729_MACS2 55.6
H3K27ac_CnT_Abcam-ab4729_SEACR 53.7
H3K27ac_CnT_SRR8383507_MACS2 72.9
H3K27ac_CnT_SRR8383507_SEACR 74.7
H3K27me3_ENCODE_MACS2.bed 97.4
H3K27me3_ENCODE_SEACR.bed 98.2
H3K27ac_ENCODE 0.0
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R1 87.3
H3K27ac_TIP_Abcam.phase_1_05_jan_2022.S_1_R2 72.3
H3K27ac_TIP_Abcam.phase_2_03_feb_2022.S_4_R1 77.0

ChromHMM annotation of reference peaks not found in sample peaks.

3.2 ChIPseeker

EpiCompare uses annotatePeak function in ChIPseeker package to annotate peaks with the nearest gene and genomic region where the peak is located. The peaks are annotated with genes taken from the annotations of human genome hg19 provided by Bioconductor.

3.3 Functional Enrichment Analysis

EpiCompare performs KEGG pathway and GO enrichment analysis using clusterProfiler. annotatePeak function in ChIPseeker package is first used to assign peaks to nearest genes and biological themes amongst the genes are identified using ontologies (KEGG and GO). The peaks are annotated with genes taken from the annotations of human genome hg19 provided by Bioconductor.

KEGG

GO

4. Session Info

## R version 4.1.2 (2021-11-01)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur 11.2
## 
## Matrix products: default
## LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] EpiCompare_0.99.0    org.Hs.eg.db_3.14.0  AnnotationDbi_1.56.2 IRanges_2.28.0       S4Vectors_0.32.3     Biobase_2.54.0       BiocGenerics_0.40.0 
##  [8] testthat_3.1.2       devtools_2.4.3       usethis_2.1.5       
## 
## loaded via a namespace (and not attached):
##   [1] utf8_1.2.2                               tidyselect_1.1.2                         heatmaply_1.3.0                         
##   [4] RSQLite_2.2.10                           htmlwidgets_1.5.4                        TSP_1.2-0                               
##   [7] grid_4.1.2                               BiocParallel_1.28.3                      scatterpie_0.1.7                        
##  [10] munsell_0.5.0                            codetools_0.2-18                         withr_2.4.3                             
##  [13] colorspace_2.0-3                         GOSemSim_2.20.0                          TxDb.Hsapiens.UCSC.hg38.knownGene_3.14.0
##  [16] filelock_1.0.2                           highr_0.9                                knitr_1.37                              
##  [19] rstudioapi_0.13                          ggsignif_0.6.3                           DOSE_3.20.1                             
##  [22] MatrixGenerics_1.6.0                     labeling_0.4.2                           GenomeInfoDbData_1.2.7                  
##  [25] polyclip_1.10-0                          seqPattern_1.26.0                        bit64_4.0.5                             
##  [28] farver_2.1.0                             downloader_0.4                           rprojroot_2.0.2                         
##  [31] vctrs_0.3.8                              treeio_1.18.1                            generics_0.1.2                          
##  [34] xfun_0.29                                BiocFileCache_2.2.1                      R6_2.5.1                                
##  [37] GenomeInfoDb_1.30.1                      graphlayouts_0.8.0                       seriation_1.3.2                         
##  [40] locfit_1.5-9.4                           bitops_1.0-7                             BRGenomics_1.6.0                        
##  [43] cachem_1.0.6                             fgsea_1.20.0                             gridGraphics_0.5-1                      
##  [46] DelayedArray_0.20.0                      assertthat_0.2.1                         BiocIO_1.4.0                            
##  [49] scales_1.1.1                             vroom_1.5.7                              ggraph_2.0.5                            
##  [52] enrichplot_1.14.2                        gtable_0.3.0                             processx_3.5.2                          
##  [55] tidygraph_1.2.0                          rlang_1.0.1                              genefilter_1.76.0                       
##  [58] splines_4.1.2                            rtracklayer_1.54.0                       rstatix_0.7.0                           
##  [61] lazyeval_0.2.2                           impute_1.68.0                            broom_0.7.12                            
##  [64] abind_1.4-5                              yaml_2.3.5                               reshape2_1.4.4                          
##  [67] backports_1.4.1                          GenomicFeatures_1.46.5                   crosstalk_1.2.0                         
##  [70] qvalue_2.26.0                            clusterProfiler_4.2.2                    tools_4.1.2                             
##  [73] ggplotify_0.1.0                          gridBase_0.4-7                           ggplot2_3.3.5                           
##  [76] ellipsis_0.3.2                           gplots_3.1.1                             jquerylib_0.1.4                         
##  [79] RColorBrewer_1.1-2                       sessioninfo_1.2.2                        Rcpp_1.0.8                              
##  [82] plyr_1.8.6                               progress_1.2.2                           zlibbioc_1.40.0                         
##  [85] purrr_0.3.4                              RCurl_1.98-1.6                           ps_1.6.0                                
##  [88] prettyunits_1.1.1                        ggpubr_0.4.0.999                         viridis_0.6.2                           
##  [91] SummarizedExperiment_1.24.0              ggrepel_0.9.1                            fs_1.5.2                                
##  [94] magrittr_2.0.2                           data.table_1.14.2                        DO.db_2.9                               
##  [97] matrixStats_0.61.0                       pkgload_1.2.4                            hms_1.1.1                               
## [100] patchwork_1.1.1                          evaluate_0.15                            xtable_1.8-4                            
## [103] XML_3.99-0.9                             gridExtra_2.3                            compiler_4.1.2                          
## [106] biomaRt_2.50.3                           tibble_3.1.6                             KernSmooth_2.23-20                      
## [109] crayon_1.5.0                             shadowtext_0.1.1                         htmltools_0.5.2                         
## [112] ggfun_0.0.5                              tzdb_0.2.0                               tidyr_1.2.0                             
## [115] geneplotter_1.72.0                       aplot_0.1.2                              DBI_1.1.2                               
## [118] tweenr_1.0.2                             genomation_1.26.0                        ChIPseeker_1.30.3                       
## [121] dbplyr_2.1.1                             MASS_7.3-55                              rappdirs_0.3.3                          
## [124] boot_1.3-28                              car_3.0-12                               Matrix_1.4-0                            
## [127] readr_2.1.2                              brio_1.1.3                               cli_3.2.0                               
## [130] parallel_4.1.2                           igraph_1.2.11                            GenomicRanges_1.46.1                    
## [133] pkgconfig_2.0.3                          TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2  registry_0.5-1                          
## [136] GenomicAlignments_1.30.0                 plotly_4.10.0                            foreach_1.5.2                           
## [139] xml2_1.3.3                               ggtree_3.2.1                             annotate_1.72.0                         
## [142] bslib_0.3.1                              webshot_0.5.2                            XVector_0.34.0                          
## [145] yulab.utils_0.0.4                        callr_3.7.0                              stringr_1.4.0                           
## [148] digest_0.6.29                            Biostrings_2.62.0                        rmarkdown_2.11                          
## [151] fastmatch_1.1-3                          tidytree_0.3.8                           dendextend_1.15.2                       
## [154] restfulr_0.0.13                          curl_4.3.2                               Rsamtools_2.10.0                        
## [157] gtools_3.9.2                             rjson_0.2.21                             lifecycle_1.0.1                         
## [160] nlme_3.1-155                             jsonlite_1.8.0                           carData_3.0-5                           
## [163] desc_1.4.0                               viridisLite_0.4.0                        BSgenome_1.62.0                         
## [166] fansi_1.0.2                              pillar_1.7.0                             lattice_0.20-45                         
## [169] pkgbuild_1.3.1                           KEGGREST_1.34.0                          fastmap_1.1.0                           
## [172] httr_1.4.2                               plotrix_3.8-2                            survival_3.2-13                         
## [175] GO.db_3.14.0                             remotes_2.4.2                            glue_1.6.2                              
## [178] iterators_1.0.14                         png_0.1-7                                bit_4.0.4                               
## [181] ggforce_0.3.3                            stringi_1.7.6                            sass_0.4.0                              
## [184] blob_1.2.2                               DESeq2_1.34.0                            caTools_1.18.2                          
## [187] memoise_2.0.1                            dplyr_1.0.8                              ape_5.6-1